package com.qf.service.impl;


import com.qf.dao.AccountDao;
import com.qf.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
@Service
public class AccountServiceImpl implements AccountService {
    @Autowired
    private AccountDao accountDao;

//    public void setAccountDao(AccountDao accountDao) {
//        this.accountDao = accountDao;
//    }

    @Override
    public void transfor(String cardNo, String toCardNo, BigDecimal money) {
        accountDao.minusUpdate(cardNo,money);
        int i = 10 / 0;
        accountDao.plusUpdate(toCardNo,money);
    }
}
